<?php

/**
 * This file is part of habo_new_media.
 *
 * @link     https://www.berlen.cn/
 * @contact  tech@berlen.cn
 * @license  http://gitlab.rehou.cn/habo/habo_new_media/-/blob/master/README.md
 */
namespace app\model;

use think\Model;

class OeAdvertiserDailyStatModel extends Model
{
    protected $name = 'oe_advertiser_daily_stat';
    /*
   * 获取消耗
   */
    public function getCost(): float
    {
        return floatval(bcadd(strval($this->cost), strval($this->company_wallet_cost), 3));
    }
    /*
    * 获取赠款消耗
    */
    public function getRewardCost(): float
    {
        return floatval(bcadd(strval($this->reward_cost), strval($this->shared_wallet_cost), 3));
    }

    /*
   * 获取现金消耗
   */
    public function getCashCost(): float
    {
        return floatval(bcadd(strval($this->cash_cost), strval($this->company_wallet_cost), 3));
    }


    /*
  * 获取余额
  */
    public function getBalance(): float
    {
        return floatval($this->balance);
    }
}
